﻿@model DoAnForum.Models.CreatePMessageModel
@{
    ViewBag.Title = "CreateTopic";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@if (ViewBag.Error!=null)
{
    <script type="text/javascript"> $(function() { $('div.alert').delay(2200).fadeOut(); });</script>
    <div class="alert alert-block fade in">
        <a href="#" data-dismiss="alert" class="close">&times;</a>
        @ViewBag.Error
    </div>
}

@using (Html.BeginForm("CreateMessage","PMessage", FormMethod.Post, null))
{
    <div class="span9">
        <div class="editor-label">
            Người nhận
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.ToUserName)
            @Html.ValidationMessageFor(model => model.ToUserName)
        </div>
    </div>
    
    <div class="span9">
        <div class="editor-label">
            Tiêu đề
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Subject)
            @Html.ValidationMessageFor(model => model.Subject)
        </div>
    </div>
    
    <div class="span9">
        <div class="editor-field">
            @Html.EditorFor(model => model.Content)
            @Html.ValidationMessageFor(model => model.Content)
        </div>
    </div>
    
    <div class="btnNewTopic">
        <input type="submit" value="Gửi"  class="btn btn-success btn-large newTopic"/>
    </div>
}

